import {fetch} from '../../../lib/base';

/**
 * 实现新增菜单
 * @param params
 * @returns {*|Promise|Promise<any>}
 */
export const addTree = params => {
  return fetch('/tree/addTree', params);
}

/**
 * 实现验证菜单编码是否重复
 * @param params
 * @returns {*|Promise|Promise<any>}
 */
export const checkTreeCode = params => {
  return fetch('/tree/checkTreeCode', params);
}


/**
 * 实现获取菜单树
 * @param params
 * @returns {*|Promise|Promise<any>}
 */
export const getTreeList = params => {
  return fetch('/tree/getTreeList', params);
}
